package com.example.community.mapper;


import com.example.community.entity.Comment;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface CommentMapper {

    List<Comment> selectCommentByEntity(@Param("entityType") int entityType, @Param("entityId") int entityId, @Param("offset")int offset, @Param("limit")int limit);

    int selectCountByEntity(@Param("entityType") int entityType, @Param("entityId")int entityId);

    int insertComment(Comment comment);

    Comment selectCommentById(Integer entityId);
}
